package com.jixiaotian.spring.annotation.demo.xml;

import ch.qos.logback.classic.spi.ClassPackagingData;
import com.jixiaotian.spring.annotation.project.entity.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author: jixiaotian.ch@qq.com
 * @Date : 2020/9/10
 */
public class MyTest {

    @Test
    public void test() {

        ApplicationContext app = new ClassPathXmlApplicationContext("application.xml");

        Object person1 = app.getBean("person");
        Object person2 = app.getBean("person");
        Object person3 = app.getBean(Person.class);

        System.out.println(person1 == person2);
        System.out.println(person2 == person3);
        System.out.println(person3 == person1);
    }



}
